<template>
  <div>
    <el-form
      :inline="true"
      :model="dataForm"
      @keyup.enter.native="getDataList()"
    >
      <el-form-item>
        <el-input v-model="data" placeholder="查询" clearable></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="findAll()">查询</el-button>
      </el-form-item>
    </el-form>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column header-align="center"
                       align="center" prop="userId" label="用户" width="180"></el-table-column>
      <el-table-column header-align="center"
                       align="center" prop="type" label="类型" width="180"></el-table-column>
      <el-table-column header-align="center"
                       align="center" prop="context" label="备注" width="180"></el-table-column>
      <el-table-column header-align="center"
                       align="center" prop="createTime" label="呼叫时间" width="200"></el-table-column>

    </el-table>

  </div>
</template>
<script>
export default {
  name: "serve",
  data() {
    return {
      data: [],
      pageIndex: 1,
      pageSize: 10,
      totalPage: 0,
      tableData: [

      ],
    };
  },
  mounted() {
    // this.findreqpunchaudit();
    this.getDataList();
  },
  methods: {
    async getDataList() {
      let result = await this.$API.room.getAllServer({
    });
      if (result.data.code === 20000) {

        this.tableData = result.data.data;
      }},
    async findAll() {
      let result = await this.$API.room.getAllServer({});
      if (result.data.code === 20000) {
        this.$message({
          message: '刷新成功',
          type: 'success',
          duration: 800,
        })
        this.tableData = result.data.data;
      }
    },
  },
};
</script>
<style scoped></style>
